# Simple makefile for installing cmetricd
# Should simplify integration with spec and debian package building.
#
# $Id$

DESTDIR ?=
NAME ?= cmetricd

all:
	echo "No need to do anything."

install:
	mkdir -p $(DESTDIR)
	mkdir -p $(DESTDIR)/usr/share/$(NAME)/
	mkdir -p $(DESTDIR)/usr/sbin
	mkdir -p $(DESTDIR)/etc/cmetric.d
	mkdir -p $(DESTDIR)/etc/init.d
	install -m 755 cmetricd $(DESTDIR)/usr/sbin
	install -m 644 sample/temp_ipmi.example $(DESTDIR)/usr/share/$(NAME)/
	install -m 644 sample/test_multihost.example $(DESTDIR)/usr/share/$(NAME)/
	install -m 644 sample/swap_activity $(DESTDIR)/usr/share/$(NAME)/
	install -m 644 sample/swap_activity $(DESTDIR)/etc/cmetric.d/
	install -m 755 cmetricd.init $(DESTDIR)/etc/init.d/$(NAME)
